package znbkListNtxl.api;

import com.example.lancooznbk.service.HttpGetServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.Api.UserInfo;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxFragment;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by Administrator on 2018\2\1 0001.
 */

public class TrainingDifficultProblemsListApi extends BaseApi {

    private String QueType = "";
    private int AnswerState = -1;
    private int PageNumber = 1;
    private int PageSize = 10;

    public TrainingDifficultProblemsListApi(HttpOnNextListener listener, RxFragment rxFragment) {
        super(listener, rxFragment);
    }

    public String getQueType() {
        return QueType;
    }

    public void setQueType(String queType) {
        QueType = queType;
    }

    public int getAnswerState() {
        return AnswerState;
    }

    public void setAnswerState(int answerState) {
        AnswerState = answerState;
    }

    public int getPageNumber() {
        return PageNumber;
    }

    public void setPageNumber(int pageNumber) {
        PageNumber = pageNumber;
    }

    public int getPageSize() {
        return PageSize;
    }

    public void setPageSize(int pageSize) {
        PageSize = pageSize;
    }


    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpGetServer httpGetServer = retrofit.create(HttpGetServer.class);
        return httpGetServer.getTrainingDifficultProblemsItem(UserInfo.StuId,UserInfo.SubjectId, UserInfo.StageNo,
                QueType,AnswerState,PageNumber,PageSize);
    }

}
